#if !defined(AFX_MYLISTBOX_H__CC9D8597_8F28_4F4D_99DD_27BC5E55E544__INCLUDED_)
#define AFX_MYLISTBOX_H__CC9D8597_8F28_4F4D_99DD_27BC5E55E544__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MyListBox.h : header file
//
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF")


#define  LIST_ITEMCHANGED  WM_USER +99

/////////////////////////////////////////////////////////////////////////////
// CMyListBox window

class CMyListBox : public CListBox
{
// Construction
public:
	CMyListBox();

// Attributes
public:
 	bool SetDBConn(	_ConnectionPtr pConn);
	_ConnectionPtr GetDBConn(void);
	bool QueryAndList();
	void SetTableName(CString strTableName);
	void SetContext(CString strText,CRect rc);
// Attributes
public:


	static int m_nObjCount;
	_ConnectionPtr m_pConnection;

    //	CEdit     m_editBox;
    //CListBox * m_pListBox;
	CString m_strEditText;
	CString m_strTableName;
	CString m_strKeyName;
	int m_nFontHeight;public:
	CRect m_rect;
	int m_nMaxItem;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyListBox)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMyListBox();

	// Generated message map functions
protected:
	//{{AFX_MSG(CMyListBox)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);


	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MYLISTBOX_H__CC9D8597_8F28_4F4D_99DD_27BC5E55E544__INCLUDED_)
